<template>
  <el-carousel :interval="4000" type="card" height="300px">
    <el-carousel-item v-for="item in banners">
      <img :src="item">
    </el-carousel-item>
  </el-carousel>
</template>
<script>
import { getCardStat } from '../api/api';
export default {
    data() {
      return {
         banners:[]
      }
    },
    mounted(){
    	this.fetchData()
    },
    methods:{
    	fetchData:function(){
      	this.banners=['static/img/1.png','static/img/2.png','static/img/3.png','static/img/4.png','static/img/5.png','static/img/6.png']
      }
    }
  }
</script>

<style>
  .el-carousel__item img {
		height:100%;
     width: 100%;
    display: block;
  }
  
  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
</style>